<template>
    <div>
        <a-form-model :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
            <a-form-model-item label="网关地址">
                <a-input v-model="form.gateway" />
            </a-form-model-item>
            <a-form-model-item label="子掩码">
                <a-input v-model="form.subnetMask" />
            </a-form-model-item>
            <a-form-model-item label="可分配的起始地址">
                <a-input v-model="form.startIp" />
            </a-form-model-item>
            <a-form-model-item label="结束地址">
                <a-input v-model="form.endIp" />
            </a-form-model-item>
        </a-form-model>
    </div>
</template>

<script>
export default {
    name: 'LanNetwork',
    data() {
        return {
            form: {
                gateway: '192.168.10.1',
                subnetMask: '255.255.255.0',
                startIp: '192.168.10.2',
                endIp: '192.168.10.254'
            }
        }
    },
    methods: {
        getConfig() {
            return { ...this.form }
        },
        setConfig(config) {
            this.form = { ...this.form, ...config }
        }
    }
}
</script>

<style scoped>
.ant-form-item {
    margin-bottom: 0;
}
</style> 